projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5536893
)
Make sh-mode use `auto-mode-interpreter-regexp'
author
Lars Ingebrigtsen
<larsi@gnus.org>
Wed, 20 Jan 2021 02:25:46 +0000
(
03:25
+0100)
committer
Lars Ingebrigtsen
<larsi@gnus.org>
Wed, 20 Jan 2021 02:25:46 +0000
(
03:25
+0100)
* lisp/progmodes/sh-script.el (sh-mode): Use
`auto-mode-interpreter-regexp' instead of open-coding the value
(bug#17158).
lisp/progmodes/sh-script.el
patch
|
blob
|
history
diff --git
a/lisp/progmodes/sh-script.el
b/lisp/progmodes/sh-script.el
index a417de32640429e0096c65e014c7a8610e7e9659..d3692d47205c8cc9eebd7cd49bbbe4dc5cad2395 100644
(file)
--- a/
lisp/progmodes/sh-script.el
+++ b/
lisp/progmodes/sh-script.el
@@
-1556,7
+1556,7
@@
with your script for an edit-interpret-debug cycle."
(sh-set-shell
(cond ((save-excursion
(goto-char (point-min))
- (looking-at
"#![ \t]?\\([^ \t\n]*/bin/env[ \t]\\)?\\([^ \t\n]+\\)"
))
+ (looking-at
auto-mode-interpreter-regexp
))
(match-string 2))
((not buffer-file-name) sh-shell-file)
;; Checks that use `buffer-file-name' follow.